<?php

declare (strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 * Class Percentage
 * @package App\Model
 * @property int id
 * @property int cooperative_id
 * @property int employer_id
 * @property int task_id
 * @property float price
 * @property int is_self_merchant
 * @property string created_at
 *
 * @property User $user
 * @property Cooperative cooperative
 */
class Percentage extends Model
{
    protected $table = 'percentage';

    public function user()
    {
        return $this->belongsTo(User::class, 'employer_id', 'id');
    }

    public function cooperative()
    {
        return $this->belongsTo(Cooperative::class, 'cooperative_id', 'id');
    }

}